"""
MiniCoder CLI 工具模块

提供各种内置工具，包括文件操作、Git 操作、代码搜索、网络工具等。
"""

from .base import BaseTool, ToolResult, ToolError
from .tool_manager import ToolManager

__all__ = [
    # 基类
    'BaseTool',
    'ToolResult', 
    'ToolError',
    
    # 工具管理器
    'ToolManager',
]

# 延迟导入工具类，避免循环导入
def _get_default_tools():
    """获取默认工具列表"""
    from .file_tools import FileSearchTool, FileFilterTool, FileStatsTool
    from .file_edit_tools import FileCreateTool, FileEditTool, FileDeleteTool, CodeSaveTool
    from .git_tools import GitStatusTool, GitDiffTool, GitCommitTool, GitLogTool
    from .search_tools import CodeSearchTool, TextSearchTool, PatternSearchTool
    from .web_tools import WebSearchTool, URLFetchTool
    from .code_analysis import CodeQualityTool, DependencyAnalyzer, CodeMetricsTool
    from .project_tools import ProjectAnalyzerTool, ProjectStructureTool, ProjectDependenciesTool

    return [
        FileSearchTool,
        FileFilterTool,
        FileStatsTool,
        FileCreateTool,
        FileEditTool,
        FileDeleteTool,
        CodeSaveTool,
        GitStatusTool,
        GitDiffTool,
        GitCommitTool,
        GitLogTool,
        CodeSearchTool,
        TextSearchTool,
        PatternSearchTool,
        WebSearchTool,
        URLFetchTool,
        CodeQualityTool,
        DependencyAnalyzer,
        CodeMetricsTool,
        ProjectAnalyzerTool,
        ProjectStructureTool,
        ProjectDependenciesTool,
    ]

# 默认工具列表
DEFAULT_TOOLS = _get_default_tools()
